public class HomeTheaterFacade {

    //定义各个子系统对象
    private Popcorn popcorn;
    private DVDplayer dVDPlayer;

    //构造器
    public HomeTheaterFacade() {
        super();
        this.popcorn = Popcorn.getInstance();
        this.dVDPlayer = DVDplayer.getInstanc();
    }

    //操作分成 4  步
    public void ready() {
        popcorn.pop();
        dVDPlayer.on();
    }

    public void play() {
        dVDPlayer.play();
    }

    public void pause() {
        dVDPlayer.pause();
    }

    public void end() {
        popcorn.off();
        dVDPlayer.off();
    }

    public static void main(String[] args) {
        HomeTheaterFacade  homeTheaterFacade = new HomeTheaterFacade();
        homeTheaterFacade.ready();
        homeTheaterFacade.play();

    }
}
